package org.codert.jpa.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @description:
 * @author: TanJingyu
 * @create: 2021-09-24 17:01
 **/
@RestController
@RequestMapping("/file")
public class FileController {

    @RequestMapping
    public String file(MultipartFile file) {
        if (file != null) {
            return String.valueOf(file.getSize());
        }
        return "no file";
    }
}
